Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macro do_drat() #221

Merged
merged 38 commits into from
Jan 18, 2020
Merged

Add macro do_drat() #221

merged 38 commits into from
Jan 18, 2020

Conversation

pat-s
Copy link
Member

@pat-s pat-s commented Jan 16, 2020

Because I have a use case for it, I optimized the drat approach and put it into a macro.

Changes

  • only build and deploy if the version number is not "dev" (to avoid incremental increase of the repo size with no changing versions). Can be actived via arg deploy_dev = TRUE.
  • require to specify the repo slug for the drat repo in do_drat() (more descriptive, less complicated compared to the old approach)
  • Add a section in vignette "deployment" how to set up SSH keys so that one can deploy on Appveyor
  • Remove the autorendering of index.Rmd to have a file listing. I think we can do better and easier within README.Rmd. The rendering of README.Rmd should happen externally and not somewhat hidden within that macro
  • added {desc} to Suggests to query package version key

I am about to update the tic.drat example repo as well but I am still facing some deploy issues on Appveyor which might relate to ropensci/ropenscilabs account permissions. With the linked example above for the {mlr3learners] repo everything works smoothly :)

@pat-s pat-s requested a review from krlmlr January 16, 2020 21:48
Copy link
Collaborator

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good!

remote_url = NULL,
commit_message = NULL,
commit_paths = ".",
ssh_key_name = "id_rsa",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still the correct default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case yes. We have to manually insert the private secured key in appveyor.yml and I think inserting it with "TRAVIS_DEPLOY_KEY" would be misleading.

Since "id_rsa" is supported universally, I choose to go with it here.
Keys on Appveyor needs to be manually created anyway until now. We could change the name once we have an Appveyor client pkg.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind reverting to "id_rsa", this would save lots of downstream pain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I know. One reason of the whole effort was to ensure that differently named private SSH key works throughout all functions, especially when installing the key. This came from the motivation to decouple travis::use_travis_deploy() from {tic}. I know that this does not mean that the default needs to change necessarily - but having a different one is an indirect way to save the tests whether a custom name would also work 😅

Also I still think that some non-tech users will have an easier life understanding what that env var is about.

However, I see that we complicate things (a bit) since id_rsa is the canonical default picked up everywhere.

Argh, I don't know what's best 🤔

@pat-s pat-s mentioned this pull request Jan 17, 2020
@pat-s
Copy link
Member Author

pat-s commented Jan 17, 2020

@krlmlr

  • Added a new "troubleshooting" vignette which should server as the reference for common/weird errors occurring throughout the whole CI world
  • Updates the example repos tic.drat and especially tic.drat.repo. The latter now auto-updates the README once a week with package names living in the drat repo

Uff, this took some time but I really like it. Hence I'd say it was worth the time 😃

@pat-s pat-s changed the title Add macro do_drat() Add macro do_drat() Jan 18, 2020
@pat-s pat-s merged commit 2d16e0c into master Jan 18, 2020
@pat-s pat-s deleted the do-drat branch January 18, 2020 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants